import { post } from './api'


function getFileUploadData(cb: Function) {
  //v1.L1.文件S3前端上传参数.ok
  //https://apib.hd.xxx.com/v1/file/params
  return post('/file/params', {}, cb)
}

// function cropImg(params: any, cb: Function) {
  //https://apib.hd.xxx.com/v1/file/imgx
  // return post('/file/imgx', params, cb)
// }
function generateQrcode(params: any, cb: Function) {
  //https://apib.hd.xxx.com/v1/site/qrcode
  return post('/site/qrcode', params, cb)
}
function createSiteToServer(params: IWebSiteAdd, cb: Function) {
  //https://apib.hd.xxx.com/v1/site/add
  return post('/site/add', params, cb)
}
function saveSiteDatasToServer(params: IWebSiteData_, cb: Function) {
  return post('/site/save', { params: JSON.stringify(params) }, cb)
}


export {
  getFileUploadData,
  generateQrcode,
  createSiteToServer,
  saveSiteDatasToServer
}
